<template>
  <div class="default">
    <div class="default-layout">
      <mHeader></mHeader>
      <slot />
    </div>
  </div>
</template>
<script setup>
// 防止f12
window.onkeydown =
  window.onkeyup =
  window.onkeypress =
    function (event) {
      // 判断是否按下F12，F12键码为123
      if (event.keyCode === 123) {
        alert('请勿使用爬虫，有需求可联系管理员')
        event.preventDefault() // 阻止默认事件行为
        window.event.returnValue = false
      }
    }

// 禁用右键
window.oncontextmenu = function () {
  event.preventDefault() // 阻止默认事件行为
  return false
}
console.error('请勿使用爬虫，否则将面临法律的制裁')


</script>
<style lang="scss">
.bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  img {
    width: 100%;
  }
}
.mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 1);
  background: white;
  // color: white;
  z-index: 10000;
  .title {
    margin-top: 100px;
    text-align: center;
    font-size: 18px;
  }
  .qr-wrap {
    margin: auto;
    width: 300px;
    height: 300px;

    margin-top: 20px;
    img {
      width: 100%;
      height: 100%;
      object-fit: scale-down;
      border-radius: 300px;
    }
  }
  .btn-wrap {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .icon-wrap {
    position: absolute;
    right: 20px;
    top: 20px;
  }
}
.qr-icon {
  position: fixed;
  top: 240px;
  right: 0px;
  width: 30px;
  height: 24px;
  background-color: pink;
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
  overflow: hidden;
  padding: 4px;
  z-index: 10;
  // box-sizing: border-box;
  img {
    width: 24px;
    height: 24px;
    object-fit: scale-down;
    border-radius: 24px;
  }
}
</style>
